#include <omd.h>

class creator:public MDSystemGrid {
	void CreateSystem() {
		AddAtom(new FCC("100", 16, 16, 16, "aluminum"))
			->Create()
			->SetTemperature(param.double_value("temperature"))
			->SetName("target");
	}
	
	void CreateGadget() {
		SetIntegrator(new MDIntegrator);
		AddForce(new TForceEAM("aluminum"));
		AddModify(new VerletList);
		AddModify(new TempController(param.double_value("temperature"), 0.5));
		AddDetector(new SysMonitor("export.out"));
		AddDetector(new ThermoDetector(0.1));
	}
	
	void BeforeRun() {
		PrintInfo("pbc_export.info");
		DumpAtoms("export-init.cry");
	}
	
	void AfterRun() {
		SaveSimulation("export.bin");
		DumpAtoms("export.cry");
	}

};

int main(int argc, char* argv[]) {
	creator c;
	c.SetArgument(argc,argv);
	return c.Run();
}
